<?php
/*
 * Created on 22.12.2005
 *
 */

/**
 * attributes:
 * 
 * id: id of html element to set opacity of
 * value: opacity value to set (double)
 */
class ajax_setOpacityHandler
{
    
    var $name = null;

    function startElement (& $sender, $attrs, $line)
    {
        if (empty($attrs['id']))
            $sender->appendCode('$out->write("alert(\'Attribute id is missing in tag ajax:showElement in line '.$line.'!\');");');
        elseif (empty($attrs['value']))
            $sender->appendCode('$out->write("alert(\'Attribute value is missing in tag ajax:showElement in line '.$line.'!\');");');
        else
            $sender->appendCode('$out->write("dojo.style.setOpacity(dojo.byId('.$attrs['id'].'), ".'.$attrs['value'].'.");");');
    }

    function endElement (& $sender)
    {
    }

}

?>